<?php defined('IN_IA') or exit('Access Denied');?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php  echo $goods['gname'];?></title>
<?php  echo register_jssdk();?>
<meta charset="utf-8">
<meta name="description">
<meta name="keywords">
<meta content="eric.wu" name="author">
<meta content="telephone=no, address=no" name="format-detection">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<link href="http://353556.m.weimob.com/vshop/Assets/css/reset.css?v=%3C%=HelpCode.Version%20%%3E" rel="stylesheet">
<link href="../addons/feng_fightgroups/template/css/common.css?v=135" rel="stylesheet">
<link href="http://353556.m.weimob.com/vshop/Assets/css/detail3.css?v=%3C%=HelpCode.Version%20%%3E" rel="stylesheet">
<script src="../addons/feng_fightgroups/template/js/jquery.min.js" language="javascript"></script>
<script  src="../addons/feng_fightgroups/template/js/touchslider.min.js" language="javascript"></script>
<script language="javascript" src="../addons/feng_fightgroups/template/js/swipe.js"></script>
<style>
.kt{background-color:#FFF;font-size:12px;padding:0 10px 10px 0}
.kt:after{clear:both;content:"";display:block;height:0;visibility:hidden}
.kt_item{background-color:#F0373D;color:#FFF;float:left;height:60px;margin-right:10px;overflow:hidden;position:relative;text-align:center;width:50%}
.kt_item:last-child{margin-right:-10px}
.kt_tit{font-size:14px;height:18px;line-height:18px;margin-bottom:0;margin-top:13px;color:#FFF}
.kt_price{padding-bottom:15px;color:#FFF}
.kt_price i{font-size:12px}
.kt_price b{font-size:18px;font-weight:400}
.kt_btn{background-color:#404040;bottom:0;height:23px;left:0;line-height:23px;margin-top:2px;position:absolute;width:100%;color:#FFF}
.kt_btn:before{background:url("") repeat-x scroll 0 0/4px 2px transparent;content:"";display:block;height:2px;left:0;position:absolute;right:0;top:-2px;width:100%}
.kt_btn:after{background-position:-314px -85px;content:"";display:inline-block;height:9px;margin-left:5px;vertical-align:0;width:5px}
.kt_item_buy{background-color:#E49047}
.kt_item_disabled{background-color:#EAEAEA;color:#A3A3A3}
.kt_item_disabled .kt_btn{background-color:#CBCBCB;color:#797979}
.kt_item_disabled .kt_btn:before{background:url("") repeat-x scroll 0 0/4px 2px transparent}
</style>
<style type="text/css">
.ht{margin:0 0 10px}
.ht_tit{height:36px;line-height:36px;padding:0 10px}
.ht_list{font-size:12px;border:1px solid #D5D5D5;background-color:#fff;border-left:0 none;border-right:0 none}
.ht_item{position:relative;padding:15px 10px;padding-left:50px;border-bottom:1px solid #E3E3E3}
.ht_item:last-child{border-bottom:0px none}
.ht_avatar{position:absolute;top:15px;left:10px}
.ht_avatar img{display:block;width:30px;height:30px;overflow:hidden;-webkit-border-radius:30px;border-radius:30px;background-clip:padding-box}
.ht_info{white-space:nowrap;margin-bottom:7px}
.ht_info:after{content:'';display:block;clear:both;height:0;visibility:hidden}
.ht_name{float:left;color:#333;margin-right:10px}
.ht_time{float:right}
.ht_btn{display:block;clear:both;height:28px;line-height:28px;-webkit-border-radius:3px;border:1px solid #F0373D;overflow:hidden}
.ht_price{float:left;width:95px;background-color:#fff;text-align:center;font-size:14px;height:28px;line-height:28px;color:#666}
.ht_price i{font-size:12px}
.ht_btn_go{float:right;width:150px;background-color:#F0373D;text-align:center;color:#fff}
</style>
</head>
<body onselectstart="return true;" ondragstart="return false;">
    <div data-role="container" class="container detail3">
        <header data-role="header">
            <div data-role="widget" data-widget="slider_3" class="slider_3">
                <section data-role="widget" data-widget="img_prev_view" class="widget_wrap">
                    <div id="slider_3_wrap" style="position:relative; width:100%; margin:auto; overflow:visible!important; height:auto; visibility: visible;">
                        <ul style="list-style: none; width: 4968px; -webkit-transition: -webkit-transform 0ms; transition: -webkit-transform 0ms; -webkit-transform: translate3d(0px, 0px, 0px);">
                            <?php  if(is_array($advs)) { foreach($advs as $adv) { ?>
                            <li class="swiper-slide" style="width: 414px; display: table-cell; vertical-align: top;">
                                <a href="#">
                                    <img src="<?php  echo tomedia($adv['thumb']);?>" style="width: 100%; max-width: 100%;">
                                </a>
                            </li>
							<?php  } } ?>
                        </ul>
                        <div id="slider_3_indicate" class="slider_3_indicate">
                        <?php  $slideNum = 1;?>
						<?php  if(is_array($advs)) { foreach($advs as $adv) { ?>
							<span<?php  if($slideNum == 1) { ?> class="on"<?php  } ?>></span>&nbsp;
						<?php  $slideNum++;?>
						<?php  } } ?>
                        </div>
                    </div>
                </section>
            </div>
        </header>
        <script>
		    $(function() {
		        new Swipe($('#slider_3_wrap')[0], {
		            speed:500,
		            auto:3000,
		            callback: function(){
		                var lis = $(this.element).next("div").children();
		                lis.removeClass("on").eq(this.index).addClass("on");
		            }
		        });
		    });
		</script>

        <section data-role="body" class="body" style="min-height: 348px;">
            <!--基本信息-->
            <div class="section_body info_basic">
                <div>
                    <ul>
                        <li>
                            <div class="tbox title_and_fav">
                                <div id="label_title" class="title" style="width: 100%; font-weight:bold; font-size:18px;"><?php  echo $goods['gname'];?></div>
                                <div>
                                    <div class="fav">
                                        <span id="icon_fav1" class="icon_fav <?php  if(!empty($collect)) { ?>on<?php  } ?>" data-idx="<?php  echo $goods['id'];?>">&nbsp;</span>
                                        <label>&nbsp;</label>
                                    </div>
                                </div>
                            </div>
                            <div class="tbox price_and_fav price_and_sale">
                                <div>
                                    <div class="price">
                                        <p>
                                            拼团购买：
                                            <span id="label_price"><label>￥<?php  echo $goods['gprice'];?></label></span>
                                            <span data-activity="<?php  echo $goods['groupnum'];?>人成团">&nbsp;</span>
                                        </p>
                                    </div>
                                </div>
                            </div>
                            <p class="freight">市场价：￥<?php  echo $goods['mprice'];?><span style="float: right;">销量&nbsp;&nbsp;<?php  echo $goods['salenum'];?>件</span></p>
                            <p class="freight" style="color: #ff5366;">支付开团并邀请<?php  echo (intval($goods['groupnum'])-1)?>人参团，人数不足可以退款，详见拼团玩法</p>	
                        </li>
                    </ul>
                </div>
            </div>
            <!--进入店铺-->
            
            <!--参数&详情&评价-->
            <div class="section_body info_detail">
                <div>
                    <div id="div_nav_fixed">
                        <div id="div_nav" class="div_nav">
                            <ul class="box">
                                <li>
                                    <a href="javascript:exchange(0);" data-idx="0" class="sp" id="shangpin0">商品属性</a>
                                </li>
                                <li>
                                    <a href="javascript:exchange(1);" data-idx="1" class="sp on" id="shangpin1">图文详情</a>
                                </li>
                                <li>
                                    <a href="javascript:exchange(2);" data-idx="2" class="sp" id="shangpin2">加入分享团</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div id="div_sections" class="div_sections">
                        <section class="section_specification">
                        	<?php  if(is_array($params)) { foreach($params as $p) { ?>
                            <dl>
                                <div>
                                    <dd><label><?php  echo $p['title'];?></label><label><?php  echo $p['value'];?></label></dd>
                                </div>
                            </dl>
                            <?php  } } ?>
                        </section>

                        <section class="section_detail on" data-role="widget" data-widget="img_prev_view">
                        <div id="description" class="J_DetailSection tshop-psm tshop-psm-bdetaildes" style="margin:0px;padding:0px;">
                            <div class="content ke-post" style="margin:10px 0px 0px;padding:0px;font-size:14px;font-family:tahoma, arial, 宋体, sans-serif;">
                                <?php  echo $goods['gdesc'];?>
                            </div>
                        </div>
                        </section>
                        <section class="section_comments" style="padding: 0px 0px;">
                            <div id="list_comments">
                                <ul id="list_comments_0" class="list_comments on">
                                <?php  if(!empty($tuan_ids)) { ?>
                				<div id="more_tuan">
                				<div class="ht">
                					<div class="ht_tit">以下小伙伴正在发起团购，您可以直接参与</div>
                					<div class="ht_list">
                					<?php  if(is_array($tuan_ids)) { foreach($tuan_ids as $order) { ?>
                					<div class="ht_item">
                						<div class="ht_avatar"><img src="<?php  echo $order['avatar'];?>" alt="团长头像"></div>
                						<div class="ht_info"><div class="ht_name"><?php  echo $order['nickname'];?></div><div class="ht_time">发起时间：<?php  echo date('Y-m-d H:i:s', $order['ptime']);?></div></div>
                						<a href="<?php  echo $this->createMobileUrl('group',array('tuan_id'=>$order['id']));?>" class="ht_btn" ptag="20400.7.1"><span class="ht_price"><i>¥</i><?php  echo $goods['gprice'];?> / 件</span><span class="ht_btn_go">差<?php  echo $order['snumber'];?>人成团，火速参团 》</span></a>
                					</div>
                					<?php  } } ?>
                					</div>
                				</div>
                				</div>
                				<?php  } ?>
                                </ul>
                                <ul id="list_comments_1" class="list_comments">
                                    
                                </ul>
                                <div data-role="widget" data-widget="loading_bottom" id="loading_bottom" class="loading_bottom vhidden">							
                                    <div class="widget_wrap">								
                                        <ul class="tbox">									
                                        <li>										
                                            <div class="loading_wrap"><span class="loading">&nbsp;</span></div>									
                                        </li>									
                                        <li>
                                            正在加载，请稍后...									
                                        </li>								
                                        </ul>								
                                        <ul class="tbox">
                                            <li></li>
                                            <li style="text-align:center;">没有更多了</li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </section>
                    </div>
                </div>
            </div>
        </section>
        <footer data-role="footer">
            <div data-role="widget" data-widget="btip_widget" class="btip_widget hidden" id="btip_widget">
                <div class="widget_wrap">
                    <label id="btip_label" class="btip_label">该商品最多可购买2件</label>
                </div>
            </div>
            <div data-role="widget" data-widget="">
                <div class="widget_wrap">
                    <ul class="fixed_btn">
                        <ol id="fixed_btn" class="tbox" style="position: fixed;padding: 0 8px 0 0px;">
                            <!--<li>
                                <div style="width: 105px">
                                    <a href="javascript:;" id="btn_add_fav" class="btn_add btn_add_fav">&nbsp;</a>
                                    <a href="http://353556.m.weimob.com/vshop/353556/UserCenter/MyShoppingCartNew" id="btn_link_shopcart" class="btn_add btn_add_shopcart" data-count="0">&nbsp;</a>
                                </div>
                            </li>-->
                            <li></li>
                            <li>
                                <div class="box">
                                    <div>
                                        <a href="<?php  echo $this->createMobileUrl('orderconfirm',array('groupnum'=>1,'id'=>$goods['id'],'tuan_id'=>$tuan_id));?>" id="btn_add_shopcart" class="btn on">
                                            <label style="line-height: 20px;">￥<?php  echo $goods['oprice'];?><br/>单独购买</label></a>
                                    	<!--<a id="tuan_more_btn" class="kt_item" href="<?php  echo $this->createMobileUrl('orderconfirm',array('groupnum'=>1,'id'=>$goods['id']));?>" style="width: 98%;background: #f69555!important;height: 60px;">
							<div class="kt_price" data-unuse="1"><b id="tuan_more_price">￥<?php  echo $goods['oprice'];?></b><i>/ </i>件</div>
							<div class="kt_btn" data-unuse="1"><b id="tuan_more_number">
								单独购买
							</b>
							</div>
						</a>-->
                                    </div>
                                    <div>
                                        <a href="<?php  echo $this->createMobileUrl('orderconfirm',array('groupnum'=>$goods['groupnum'],'id'=>$goods['id'],'tuan_id'=>$tuan_id));?>" id="btn_buy" class="btn red on">
                                            <label style="line-height: 20px;">￥<?php  echo $goods['gprice'];?><br/>拼团购买</label></a>
                                        <!--<a id="tuan_more_btn" class="kt_item" href="<?php  echo $this->createMobileUrl('orderconfirm',array('groupnum'=>$goods['groupnum'],'id'=>$goods['id']));?>" style="width: 98%;background: #ff5366!important;height: 60px;">
							<div class="kt_price" data-unuse="1"><b id="tuan_more_price">￥<?php  echo $goods['gprice'];?></b><i>/ </i>件</div>
							<div class="kt_btn" data-unuse="1"><b id="tuan_more_number">
								<?php  echo $goods['groupnum'];?>人团
							</b>
							</div>
						</a>-->
                                    </div>
                                </div>
                            </li>
                        </ol>
                    </ul>
                </div>
            </div>
        </footer>
    <div data-widget="tools" data-tools="tools_widget" id="tools_widget" class="tools_widget">				
    <div class="widget_wrap">					
    <ul class="tools_widget_wrap">
    <li id="tools_kfli" style=""><a href="<?php  echo $this->createMobileUrl('index');?>" id="tolls_widget_message" class="tolls_widget_message">首页</a></li></ul></div></div></div>
</body>
<script type="text/javascript">
function exchange(numb) {
	$('#div_nav .box .sp').removeClass('on');
	$('.section_specification').removeClass('on');
	$('.section_detail').removeClass('on');
	$('.section_comments').removeClass('on');
	$('a#shangpin'+numb).addClass('on');
	if(numb==0) {
		$('.section_specification').addClass('on');
	}else if(numb==1){
		$('.section_detail').addClass('on');
	}else{
		$('.section_comments').addClass('on');
	}
}

$('#nav_comments li').click(function(){
	var commonTableIndex = $(this).attr('data-idx');
	$('#nav_comments').find("li").removeClass("on").eq(commonTableIndex).addClass("on");
    $('#list_comments').find("ul").removeClass("on").eq(commonTableIndex).addClass("on");
});
$('#icon_fav1').click(function(){
	var status = $(this).hasClass('on');
    var goodsid = $(this).attr('data-idx');
	if(status) {
		$.post('<?php  echo $this->createMobileUrl('collect',array('op'=>'remove'))?>',{goodsid:goodsid},
        function(m){
            if(m==1){
                $('#icon_fav1').removeClass('on');
                alert('取消收藏成功！');
            } else {
                alert('取消收藏失败！');
            }
        },"html");
	} else {
        $.post('<?php  echo $this->createMobileUrl('collect',array('op'=>'add'))?>',{goodsid:goodsid},
        function(m){
            if(m==1){
                $('#icon_fav1').addClass('on');
                alert('收藏成功！');
            } else {
                alert('收藏失败！');
            }
        },"html");
	}
});

</script>	
<script>
	wx.ready(function (){
	var shareData = {
		title: "<?php  echo $goods['gname'];?>",
		desc: "<?php  echo $share_data['share_desc'];?>",
		link: "<?php  echo $to_url;?>",
		imgUrl: "<?php  echo tomedia($goods['gimg']);?>",
	};
//分享朋友
	wx.onMenuShareAppMessage({
	    title: shareData.title,
	  	desc: shareData.desc,
	  	link: shareData.link,
	  	imgUrl:shareData.imgUrl,
	  	trigger: function (res) {
	  	},
	  	success: function (res) {
	    	window.location.href =adurl;
	  	},
	  	cancel: function (res) {
	  	},
	  	fail: function (res) {
	    	alert(JSON.stringify(res));
	  	}
	});
//朋友圈
	wx.onMenuShareTimeline({
	  	title: shareData.title,
	  	link: shareData.link,
	  	imgUrl:shareData.imgUrl,
	  	trigger: function (res) {
	  	},
	  	success: function (res) {
	    	window.location.href =adurl;
	  	},
	  	cancel: function (res) {
	  	},
	  	fail: function (res) {
	    	alert(JSON.stringify(res));
	  	}
	});
});
</script>
</html>